When you set a schema to your XML document, XML Instance performs an initial validation to ensure that your document is in agreement with the rules outlined by the schema. XML Instance continues to check for validity with each change you make to your document. Errors detected by XML Instance are displayed in the Errors Pane, which can be accessed via the "Check for Errors" button on the Toolbar (Figure A) as well as through the View menu.
Figure A - Check for Errors Button on Main Tool Bar
The Errors Pane (Figure B) is located below the Tag and Edit areas, directly beneath the Factory Bar . The Errors Pane contains a listing of errors along with a brief description. Typical errors include:
Note: To help you avoid making errors when working against a schema, XML Instance provides various types of content guidance.
Click on the error within the Errors Panes to identify where the error exists within the document (the problem area will be highlighted within the Tag and Edit areas.) For example, when the error is selected in Figure B, the qty element becomes highlighted within the Tag area. As the error message indicates, the schema defines qty as an integer although the qty content here has been entered as text.
Figure B - Data does not match data type
In Figure C the error selected points to the content model for address where the element city was entered incorrectly before street.
Figure C - Error because elements entered out of sequence
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516